package com.ruoyi.questionBank.service;

import com.ruoyi.common.vo.PageResult;
import com.ruoyi.exam.vo.ExamPaperVO;
import com.ruoyi.questionBank.domain.BuildPaperRule;
import com.ruoyi.questionBank.domain.ExamPaper;
import com.ruoyi.questionBank.domain.Question;
import com.ruoyi.questionBank.vo.CourseQuestionVO;
import com.ruoyi.questionBank.vo.QuestionAnswerVO;
import com.ruoyi.questionBank.vo.QuestionListVO;

import java.io.File;
import java.io.InputStream;
import java.util.Collection;
import java.util.List;
import java.util.Map;

public interface IQuestionService {
    /** 获取题目*/
    Question get(int qid);

    int sizeQuestion(QuestionListVO listVO);

    /** 分页获取题目*/
    PageResult<Question> get(QuestionListVO listVO);

    List<Question> getEnable(Collection<Integer> qids);

    List<Question> listRandomEnable();

    List<Question> list(QuestionListVO listVO);

    Map<String,String> submitAnswer(CourseQuestionVO courseQuestionVO);

    Map<String,String> submitAnswer(ExamPaperVO examPaperVO);

    /** 新增*/
    void add(Question question);

    /** 导入*/
    int importByFile(long createPerson, InputStream in);

    /** 更新*/
    void update(Question question);

    void del(int qid);

    /** 设置为不可用*/
    void unEnable(int qid);

    /** 设置为可用*/
    void enable(int qid);
}
